IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spCratosProject_Create')
	BEGIN
		PRINT 'Dropping Procedure spCratosProject_Create'
		DROP  Procedure  spCratosProject_Create
	END

GO

PRINT 'Creating Procedure spCratosProject_Create'
GO
CREATE Procedure dbo.spCratosProject_Create
	(
		@CratosProject_Name	varchar(100),
		@CratosProject_Date	datetime
	)
AS
	/* 
		------------------------------------------------------------------------------
		- Change History
		- --------------
		- Date          Description
		------------------------------------------------------------------------------
		- 25/06/2010 13:45:27    Initial version created
		------------------------------------------------------------------------------
	*/

	SET NOCOUNT ON
	
	-- Declare the required variables

	-- Create the required new record
	INSERT INTO [CratosProject]
		(CratosProject_Name, CratosProject_Date)
	VALUES
		(@CratosProject_Name, @CratosProject_Date)

	-- Handle any errors
	IF @@ERROR != 0
	BEGIN
		RAISERROR('spCratosProject_Create: Unable to Insert a new CratosProject', 10, 1)
		RETURN
	END

	-- Return the newly created ID
	SELECT	SCOPE_IDENTITY() AS 'CratosProject_ID'

	-- Return to calling method
	RETURN 

GO
